home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Direct Blitting in C++ / info.txt < prev   
Text File  |  2014-09-28  |  2KB  |  28 lines

  1. Subject:  Direct Blitting in C++
  2. Author:  Macneil Shonle
  3. Uploaded By:  MacneilS
  4. Date:  7/2/1995
  5.  
  6. File:  Blitting.sit (12750 bytes) 
  7. Estimated Download Time (60658 baud):  < 1 minute
  8. Download Count:  401
  9.  
  10. Needs:  C++ compiler
  11.  
  12. Keywords:  GWORLD OFFSCREEN DRAWING PIXMAP GRAPHICS QUICKDRAW
  13.  
  14.  
  15. LIBRARY:   MDV/Developer Source Code/C++
  16. KEYWORDS:  GWORLD OFFSCREEN DRAWING PIXMAP GRAPHICS QUICKDRAW
  17.  
  18. The Direct Blitting Class Library for the MacOS
  19.  
  20. No matter what you are doing, the direct approach is almost always the best approach. As it turns out, animation is not an exception to this rule. Unfortunately, the direct approach is not always the easiest. The following classes will help you to make direct blitting easier, faster, and more compatible for you.
  21.  
  22. The classes depend highly on C++ and the Macintosh toolbox, so some knowledge of both are necessary. The direct blitting classes are derived from one base: CDirectBlit. CDirectBlit's sub-classes are currently CDirectGWorld and CDirectVideo. The CDirectBlit class is responsible for accessing blitting information and toolbox information, while its sub-classes are responsible for setting up where the memory will be used. The CDirectGWorld class makes use of QuickDraw's offscreen GWorlds, and the CDirectVideo class makes use of onscreen CGrafPorts and device PixMaps. There is also a CCopier class, which helps you copy from one CDirectBlit to the next. Stack based GWorld setters and MMU mode swappers are also provided, modeled after classes like StHandleLocker.
  23.  
  24. Setting up a GWorld and an onscreen blitting area is easy to do. Here, for example, is how one would allocate memory for a GWorld that is ready to be directly accessed:
  25.  
  26.  CDirectGWorld offscreen( bounds, kEightBit );
  27.  
  28. where bounds is a QuickDraw rectangle describ